<?php 
 	require_once('inc/conn.php');

 ?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link rel="stylesheet" href="layui/css/layui.css">
     <script src="layui/layui.js"  charset="utf-8"></script>
    <script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form()
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  //创建一个编辑器
  var editIndex = layedit.build('LAY_demo_editor');
 
  //自定义验证规则
  form.verify({
    title: function(value){
      if(value.length<1){
        return '姓名不能为空，';
      }
    }
    ,pass: [/(.+){11,11}$/, '手机号必须是11位']
    ,content: function(value){
      layedit.sync(editIndex);
    }
  });
  
  //监听指定开关
  form.on('switch(switchTest)', function(data){
    layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
      offset: '6px'
    });
    layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
  });
  
  //监听提交
  
  
  
});
layui.use('layedit', function(){
  var layedit = layui.layedit
  ,$ = layui.jquery;
  
  //构建一个默认的编辑器
  var index = layedit.build('LAY_demo1');
  

  $('.site-demo-layedit').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });
  
  
});
</script>
<style type="text/css">
#big {
	height: 700px;
	width: 100px;
	margin-right: auto;
	margin-left: auto;
}
.big {
	height: 800px;
	width: 1000px;
	margin-right: auto;
	margin-left: auto;
}
.header {
	height: 100px;
	width: 1000px;
	margin-right: auto;
	margin-left: auto;
}
</style>
<style>
ul
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
li
{
float:left;
}
a:link,a:visited
{
display:block;
width:120px;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#7A991A;
}
.header{
	background-color:gray;
	}
.index {
	height: 500px;
	width: 1000px;
	margin-right: auto;
	margin-left: auto;
}
.footer {
	height: 100px;
	width: 1000px;
	margin-right: auto;
	margin-left: auto;
}
</style>
</head>

<body>
<div class="big">
  <div class="header"><ul>
<li><a href="#home">首页</a></li>
<li><a href="liuyan.php">给我留言</a></li>
<li><a href="#contact">联系我们</a></li>

</ul>
  <h1>新闻网</h1>
  <div class="index" style="background-color:black;color:red;">
  <?php
						$sql_friend="SELECT * FROM biao ORDER BY id desc LIMIT 0, 2";
						$result_friend=mysql_query($sql_friend);
						$config=mysql_fetch_array($result_friend);
					?>
					<?=$config['insert_title']?><br/>
					作者：<?=$config['insert_name']?>	<br/>
					联系电话:<?=$config['insert_phone1']?> <br/>
				内容：<?=$config['insert_content']?>


  </div>
  <div class="footer">

  <div class="footer">
			<div class="center_box">
				<div class="text">
					<?php
						$sql_friend="SELECT * FROM wangzhan ORDER BY id desc LIMIT 0, 2";
						$result_friend=mysql_query($sql_friend);
						$config=mysql_fetch_array($result_friend);
					?>
					名称：<?=$config['insert_name']?><br /> 
					电话：<?=$config['insert_phone']?> 
					地址：<?=$config['insert_dizhi']?><br />
					<br />
					友情链接:
					<?php
						
					?>
					<a target="_blank" href="<?=$config['insert_URL']?>"><?=$config['insert_youqinglianjie']?></a>&nbsp;&nbsp;
					<?php
					
					?>
				</div>
				
			</div>
		</div></div>
  </div>
</div>
</body>
</html>
